package com.tencent.welink.api.space.object.geo;

import com.tencent.welink.api.OpenApiTokenChange;
import com.tencent.welink.api.base.WelinkOpenApi;
import com.tencent.welink.config.BussinessConfig;
import com.tencent.welink.util.CrontabUtil;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import java.util.Map;

/**
 * @Description: wids列出含geojson对象
 * 功能描述
 * 列出wid列表出所对应的 含geojson的地理对象
 * @Author: limye
 * @CreateDate: 2020-6-9
 * @Version: V1.0
 */
public class ListGeoByWIds extends WelinkOpenApi {

    private static final Logger log = LogManager.getLogger(ListGeoByWIds.class);

    public ListGeoByWIds(){
        super("/space/geo/object/listGeoByWIds",true);
    }


    @Override
    public void displayResult(String result) {
    }


    public static void main(String[] args) {
        new BussinessConfig();
        CrontabUtil.addTaskInRate(new OpenApiTokenChange(), BussinessConfig.loginDurationMinutes,true);

        //实例化对象
        ListGeoByWIds instance = new ListGeoByWIds();

        /**
         * 名称	类型	说明
         * token	String	是	非空且长度固定128个字符	动态密钥，有效期20分钟，需重新登录
         * srid	string	是		srid，项目projectId使用0
         * wIds	string	是		逗号隔开
         * project_id	String	否	非空	项目编号
         */

        //添加参数
        Map<String,Object> map = instance.getExtendsPara();
        map.put("wIds","291b568a-a0cb-4c29-9af0-5097a5a049b9,a66348f2-0700-1000-abcd-35269c4636aa");
        map.put("srid","0");

        //执行HTTP请求及展示结果
        instance.DoHttp();
        CrontabUtil.shutdown();

    }
}
